﻿<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link href="css/404.css" rel="stylesheet" type="text/css"/>


</head>
<body>
<div class="mianBox">
    <img src="images/yun0.png" alt="" class="yun yun0"/>
    <img src="images/yun1.png" alt="" class="yun yun1"/>
    <img src="images/yun2.png" alt="" class="yun yun2"/>
    <img src="images/bird.png" alt="" class="bird"/>
    <img src="images/san.png" alt="" class="san"/>
    <div class="tipInfo">
        <div class="in">
            <div class="textThis">
                <h2>出错啦404！</h2>
                <p><span><a id="href" href="">立即返回首页</a></span></p>

            </div>
        </div>
    </div>
</div>
<script src="http://libs.baidu.com/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
    $(function () {
        var h = $(window).height();
        $('body').height(h);
        $('.mianBox').height(h);
        centerWindow(".tipInfo");
    });

    //2.将盒子方法放入这个方，方便法统一调用
    function centerWindow(a) {
        center(a);
        //自适应窗口
        $(window).bind('scroll resize',
            function () {
                center(a);
            });
    }

    //1.居中方法，传入需要剧中的标签
    function center(a) {
        var wWidth = $(window).width();
        var wHeight = $(window).height();
        var boxWidth = $(a).width();
        var boxHeight = $(a).height();
        var scrollTop = $(window).scrollTop();
        var scrollLeft = $(window).scrollLeft();
        var top = scrollTop + (wHeight - boxHeight) / 2;
        var left = scrollLeft + (wWidth - boxWidth) / 2;
        $(a).css({
            "top": top,
            "left": left
        });
    }
</script>
<script type="text/javascript">
    (function () {
        var wait = document.getElementById('wait'), href = document.getElementById('href').href;
//        var interval = setInterval(function () {
//            var time = --wait.innerHTML;
//            if (time <= 0) {
//
//                clearInterval(interval);
//                //location.href = href;
//                alert("开始跳转提示");
//            }
//        }, 1000);
    })();
</script>

</body>
</html>